package org.jgs1904.tieba.repository;

import org.jgs1904.tieba.entity.UserMail;
import org.jgs1904.tieba.enums.UserMailStatusEnum;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author junki
 * @date 2020/5/12 14:38
 */
@Repository
public interface UserMailRepository extends JpaRepository<UserMail, Long> {

    List<UserMail> findByUserIdAndStatus(Long userId, UserMailStatusEnum status);

    UserMail findByTokenAndStatus(String token, UserMailStatusEnum status);
}
